package com.notary.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 公证文件存储信息
 * </p>
 *
 * @author xujun
 * @since 2020-07-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_notary_document")
@ApiModel(value = "NotaryDocument对象", description = "公证文件存储信息")
public class NotaryDocument implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER)
    private Long id;

    private Long contractId;

    @ApiModelProperty(value = "文本名称")
    private String name;

    @ApiModelProperty(value = "文本路径")
    private String path;

    /**
     * 0 被公证合同 1 公证申请书 2 公证告知书 3 受理通知书 4 公证笔录 5 附件 6 视频  7合同转让书 8拟定公证词 9制证 10执行证书 11 核实函书',
     **/
    @ApiModelProperty(value = "类型")
    private Integer type;

    @ApiModelProperty(value = "译文名称")
    private String translation;

    @ApiModelProperty(value = "译文路径")
    private String translationUrl;

    @ApiModelProperty(value = "公证事项（事务）")
    private String notaryItem;

    @ApiModelProperty(value = "公证书编号")
    private String certificateNo;

    @ApiModelProperty(value = "其他证书编号")
    private String otherCertificateNo;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "更新人")
    private String updateBy;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty(value = "乐观锁")
    private Integer revision;


    private String content;

    private String pdfImg;

    private Long templateId;
}
